unit RCombOcorrDig;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RLReport;

type
  TFormRComOcorrDig = class(TForm)
    RLReport1: TRLReport;
    RLBand1: TRLBand;
    RLSystemInfo1: TRLSystemInfo;
    RLSystemInfo2: TRLSystemInfo;
    RLLabel1: TRLLabel;
    lblDatafim: TRLLabel;
    lblDataIni: TRLLabel;
    RLLabel4: TRLLabel;
    RLLabel3: TRLLabel;
    RLGroup1: TRLGroup;
    RLBand2: TRLBand;
    RLBand3: TRLBand;
    RLLabel2: TRLLabel;
    RLLabel5: TRLLabel;
    RLLabel6: TRLLabel;
    RLLabel7: TRLLabel;
    RLDBText1: TRLDBText;
    RLDBText2: TRLDBText;
    RLDBText3: TRLDBText;
    RLDBText4: TRLDBText;
    procedure RLDBText4BeforePrint(Sender: TObject; var Text: String;
      var PrintIt: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormRComOcorrDig: TFormRComOcorrDig;

implementation

uses DMR, Geral;

{$R *.dfm}

procedure TFormRComOcorrDig.RLDBText4BeforePrint(Sender: TObject;
  var Text: String; var PrintIt: Boolean);
begin
    if DMRel.dsRelat.DataSet.FieldByName('TEMPO').AsDateTime > StrToDateTime(GetParametro('INTERVALOMAXIMO')) Then
        RLDBText4.Font.Color := ClRed
    else
        RLDBText4.Font.Color := ClBlack;
end;

end.
